package com.fengdi.book.easy.Array;

import java.util.Arrays;

public class TwoSum {
    public int[] twoSum(int[] nums, int target) {
        int j = 1;
        int i = 0;
        int maxArea = nums.length - 1;
        while (nums[i] + nums[j] != target){
            if(j == maxArea){
                i++;
                j = i;
            }
            j++;
        }
        return new int[]{i,j};
    }
}
